#ifndef MENU_UI_H
#define MENU_UI_H

#include <QButtonGroup>
#include <QHBoxLayout>
#include <QLabel>
#include <QPushButton>
#include <QSpacerItem>
#include <QVBoxLayout>
#include <QWidget>
#include <QtWidgets>
#include "ip_port.h"
class MenuUi : public QWidget
{
    Q_OBJECT
public:
    explicit MenuUi(QWidget *parent = nullptr);
    QLabel *titleLabel = new QLabel;               // 标题
    QPushButton *minimizeButton = new QPushButton; // 最小化按钮

    QButtonGroup buttonGroup; // 按钮组

    QPushButton *newYanChu = new QPushButton;
    QPushButton *newZhowBian = new QPushButton;

    QPushButton *newPage1Btn = new QPushButton; // 新建页面1按钮
    QPushButton *newPage2Btn = new QPushButton; // 新建页面2按钮
    QPushButton *newPage3Btn = new QPushButton; // 新建页面3按钮
    QPushButton *newPage4Btn = new QPushButton;
    QPushButton *newPage5Btn = new QPushButton;
    QPushButton *newPage6Btn = new QPushButton;
    void init();
    ~MenuUi();
    // 设置pushbutton的各项参数, 文字, icon
    static void setPushButton(QPushButton *button, const QString &url, const QString &text);
    static void setPushButton(QPushButton *button, const QString &text);
signals:
    void buttonClicked(int buttonId);
};

#endif // MENU_UI_H
